package com.yan.gulimall.product.feign.fallback;

import com.yan.common.exception.BizCodeEnume;
import com.yan.common.utils.R;
import com.yan.gulimall.product.feign.SeckillFeignService;
import org.springframework.stereotype.Component;

/**
 * 引入远程调用的断路保护
 */
@Component
public class SeckillFeignServiceFallback implements SeckillFeignService {
    @Override
    public R getSkuSecKillInfo(Long skuId) {
        return R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg());
    }
}
